<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8" />
    <title>admin</title>
    <link href="{THEME_PATH}admin/css/index.css" rel="stylesheet" type="text/css" />
    <link href="{THEME_PATH}admin/css/table_form.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript">var siteurl = "{SITE_PATH}{SELF}";var memberpath = "{SITE_PATH}";</script>
    <script type="text/javascript" src="{THEME_PATH}js/{SITE_LANGUAGE}.js"></script>
    <script type="text/javascript" src="{THEME_PATH}js/jquery.min.js"></script>
    <script type="text/javascript" src="{THEME_PATH}js/jquery-ui.min.js"></script>
    <script type="text/javascript" src="{THEME_PATH}js/jquery.cookie.js"></script>
    <script type="text/javascript" src="{THEME_PATH}js/jquery.artDialog.js?skin=default"></script>
    <script type="text/javascript" src="{THEME_PATH}js/validate.js"></script>
    <script type="text/javascript" src="{THEME_PATH}js/admin.js"></script>
    <script type="text/javascript" src="{THEME_PATH}js/dayrui.js"></script>
</head>
<body style="font-size: 12px;">
<script type="text/javascript">
    {if $ids}
    $(function(){
        {loop $ids $i}
        {if $cat[$i]}
            select_list('{$cat[$i][name]}', {$i});
        {/if}
        {/loop}
    });
    {/if}
    function select_list(name, id) {
        if ($("#cat_"+id).size() > 0) {
            dr_tips("{fc_lang('栏目已经存在')}");
            return;
        }
        var html = ' <li id="cat_'+id+'">·<input type="hidden" name="data[]" value="'+id+'">';
        html+= '<span>'+name+'</span><a href="javascript:;" class="close" onclick="remove_id(\''+id+'\')"></a></li>';
        $("#select_cat").append(html);
    }
    function remove_id(id) {
        $('#cat_'+id).remove();
    }
</script>
<div style="max-height:400px;width:600px;overflow-x:hidden;overflow-y:auto">
    <form action="" method="post" name="myform" id="myform">
    <div class="subnav">
        <div class="pad-10">
            <div style="width:350px; padding:2px; border:1px solid #d8d8d8; float:left; margin-top:10px; margin-right:10px; overflow:hidden">
                <table width="100%" cellspacing="0" class="table-list">
                    <thead>
                    <tr>
                        <th align="left" width="70">Id</th>
                        <th align="left">{fc_lang('栏目名称')}</th>
                    </tr>
                    </thead>
                    <tbody>
                    {loop $cat $t}
                    <tr onclick="select_list('{$t.name}',{$t.id})" class="cur_tr">
                        <td align="left">{$t.id}</td>
                        <td align="left">{$t.cname}</td>
                    </tr>
                    {/loop}
                    </tbody>
                </table>
            </div>
            <div style="overflow:hidden;_float:left;margin-top:10px;*margin-top:0;_margin-top:0;">
                <fieldset>
                    <legend>{fc_lang('已选择的栏目')}</legend>
                    <ul class="list-dot-othors" id="select_cat">

                    </ul>
                </fieldset>
            </div>
        </div>
    </div>
    </form>
</div>